package com.bite.demo.mapper;

import com.bite.demo.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {
    //根据用户名，查询用户信息
    @Select("select id,user_name,password,github_url,delete_flag,update_time from `user` where delete_flag = 0 and user_name =#{name}")
    UserInfo selectByName(String name);
    //根据用户id，查询用户信息
    @Select("select id,user_name,github_url from `user` where delete_flag = 0 and id =#{id}")
    UserInfo selectById(Integer id);




}
